<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: FusionChartsHelper</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">FusionChartsHelper</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/lib/fusioncharts_helper_rb.html">
                lib/fusioncharts_helper.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000034">add_cache_to_data_url</a>&nbsp;&nbsp;
      <a href="#M000030">get_FC_color</a>&nbsp;&nbsp;
      <a href="#M000035">get_UTF8_BOM</a>&nbsp;&nbsp;
      <a href="#M000031">render_chart</a>&nbsp;&nbsp;
      <a href="#M000033">render_chart_get_xml_from_action</a>&nbsp;&nbsp;
      <a href="#M000032">render_chart_html</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000034" class="method-detail">
        <a name="M000034"></a>

        <div class="method-heading">
          <a href="FusionChartsHelper.src/M000034.html" target="Code" class="method-signature"
            onclick="popupCode('FusionChartsHelper.src/M000034.html');return false;">
          <span class="method-name">add_cache_to_data_url</span><span class="method-args">(str_data_url)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This function can be used when time needs to be added to the URL This will
help avoiding cache of the page rendered by the URL Can be used for dataURL
method
</p>
        </div>
      </div>

      <div id="method-M000030" class="method-detail">
        <a name="M000030"></a>

        <div class="method-heading">
          <a href="FusionChartsHelper.src/M000030.html" target="Code" class="method-signature"
            onclick="popupCode('FusionChartsHelper.src/M000030.html');return false;">
          <span class="method-name">get_FC_color</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
<a href="FusionChartsHelper.html#M000030">get_FC_color</a> function helps
return a color from arr_FCColors array. It uses cyclic iteration to return
a color from a given index. The index value is maintained in
FC_ColorCounter
</p>
        </div>
      </div>

      <div id="method-M000035" class="method-detail">
        <a name="M000035"></a>

        <div class="method-heading">
          <a href="FusionChartsHelper.src/M000035.html" target="Code" class="method-signature"
            onclick="popupCode('FusionChartsHelper.src/M000035.html');return false;">
          <span class="method-name">get_UTF8_BOM</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This function returns the BOM for UTF8. BOM needs to be placed as first few
bytes in the xml before providing to the chart. This can be used in the XML
provider views.
</p>
        </div>
      </div>

      <div id="method-M000031" class="method-detail">
        <a name="M000031"></a>

        <div class="method-heading">
          <a href="FusionChartsHelper.src/M000031.html" target="Code" class="method-signature"
            onclick="popupCode('FusionChartsHelper.src/M000031.html');return false;">
          <span class="method-name">render_chart</span><span class="method-args">(chart_swf,str_url,str_xml,chart_id,chart_width,chart_height,debug_mode,register_with_js,&amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Renders a chart from the swf file passed as parameter either making use of
setDataURL method or setDataXML method. The width and height of chart are
passed as parameters to this function. If the chart is not rendered, the
errors can be detected by setting debugging mode to true while calling this
function. This feature is not available in free version. The view file can
be registered to include javascript statements by setting registering with
javascript to true while calling this function.
</p>
<ul>
<li>parameter chart_swf : pass swf file that renders the chart.

</li>
<li>parameter str_url : URL path to the xml file.

</li>
<li>parameter str_xml : XML content.

</li>
<li>parameter chart_id : Id for the chart, using which it will be identified in
the page. Each chart on the page needs to have a unique Id. Datatype:
String

</li>
<li>parameter chart_width : Integer for the width of the chart in pixels.

</li>
<li>parameter chart_height : Integer for the height of the chart in pixels.

</li>
<li>parameter debug_mode : (Not used in Free version) If value is true, chart
is shown in debug mode.

</li>
<li>parameter register_with_js : (Not used in Free version) If value is true,
the chart is registered with javascript

</li>
</ul>
<p>
Can be called from html block int he view where the chart needs to be
embedded.
</p>
        </div>
      </div>

      <div id="method-M000033" class="method-detail">
        <a name="M000033"></a>

        <div class="method-heading">
          <a href="FusionChartsHelper.src/M000033.html" target="Code" class="method-signature"
            onclick="popupCode('FusionChartsHelper.src/M000033.html');return false;">
          <span class="method-name">render_chart_get_xml_from_action</span><span class="method-args">(chart_swf,controller_name,action_name,params,chart_id,chart_width,chart_height,debug_mode,register_with_js,&amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Uses render_component. Renders a chart using the swf file passed as
parameter by calling an action to get the xml for the setDataXML method.
The width and height of chart are passed as parameters to this function. If
the chart is not rendered, the errors can be detected by setting debugging
mode to true while calling this function.
</p>
<ul>
<li>parameter chart_swf : SWF file that renders the chart.

</li>
<li>parameter controller_name : The complete name of the controller containing
the action.

</li>
<li>parameter action_name : The name of the action which will provide the xml.

</li>
<li>parameter chart_id : String for identifying chart.

</li>
<li>parameter chart_width : Integer for the width of the chart.

</li>
<li>parameter chart_height : Integer for the height of the chart.

</li>
<li>parameter debug_mode : (Not used in Free version) If value is true, chart
is shown in debug mode.

</li>
<li>parameter register_with_js : (Not used in Free version) If value is true,
the chart is registered with javascript

</li>
</ul>
<p>
Can be called from html block in the view where the chart needs to be
embedded.
</p>
        </div>
      </div>

      <div id="method-M000032" class="method-detail">
        <a name="M000032"></a>

        <div class="method-heading">
          <a href="FusionChartsHelper.src/M000032.html" target="Code" class="method-signature"
            onclick="popupCode('FusionChartsHelper.src/M000032.html');return false;">
          <span class="method-name">render_chart_html</span><span class="method-args">(chart_swf,str_url,str_xml,chart_id,chart_width,chart_height,debug_mode,&amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Renders a chart from the swf file passed as parameter either making use of
setDataURL method or setDataXML method. The width and height of chart are
passed as parameters to this function. If the chart is not rendered, the
errors can be detected by setting debugging mode to true while calling this
function.
</p>
<ul>
<li>parameter chart_swf : SWF file that renders the chart.

</li>
<li>parameter str_url : URL path to the xml file.

</li>
<li>parameter str_xml : XML content.

</li>
<li>parameter chart_id : String for identifying chart.

</li>
<li>parameter chart_width : Integer for the width of the chart.

</li>
<li>parameter chart_height : Integer for the height of the chart.

</li>
<li>parameter debug_mode : (Not used in Free version)True ( a boolean ) for
debugging errors, if any, while rendering the chart.

</li>
</ul>
<p>
Can be called from html block in the view where the chart needs to be
embedded.
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>